package com.intellij.ide.license.impl;

import com.jetbrains.licenseServer.openapi.util.DnsUtil;
import org.jetbrains.annotations.Nullable;

public class k {
    @Nullable
    public static String a() {
        try {
            String str = b();
            if (a(str)) {
                return str;
            }
        } catch (Throwable localThrowable) {
        }
        return null;
    }

    public static boolean a(String paramString) {
        return (paramString != null) && (r.d(paramString));
    }

    @Nullable
    public static String b() {
        return DnsUtil.detectServerUrl();
    }
}
